import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
//列表数据
export const columns: BasicColumn[] = [
    {
    title: '房源占比',
    align:"center",
    dataIndex: 'roomRatio'
   },
   {
    title: '核定房源数量',
    align:"center",
    dataIndex: 'checkedRoomNum'
   },
   {
    title: '单位核定报名人数',
    align:"center",
    dataIndex: 'apartCheckPeopleNum'
   },
   {
    title: '总报名人数',
    align:"center",
    dataIndex: 'applyNumSum'
   },
   {
    title: '单位人员报名比例',
    align:"center",
    dataIndex: 'apartPeopleApplyRatio'
   },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
];
//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '房源占比',
    field: 'roomRatio',
    component: 'InputNumber',
  },
  {
    label: '核定房源数量',
    field: 'checkedRoomNum',
    component: 'InputNumber',
  },
  {
    label: '单位核定报名人数',
    field: 'apartCheckPeopleNum',
    component: 'InputNumber',
  },
  {
    label: '总报名人数',
    field: 'applyNumSum',
    component: 'InputNumber',
    dynamicRules: ({model,schema}) => {
          return [
                 { required: true, message: '请输入总报名人数!'},
          ];
     },
  },
  {
    label: '单位人员报名比例',
    field: 'apartPeopleApplyRatio',
    component: 'InputNumber',
  },
];
